import xml.etree.ElementTree as ET
import os
path = os.getcwd()
xml_lists = os.listdir(path)
for xml_list in xml_lists:
    if xml_list == "Changelabel.py":
        continue
    else:
        tree = ET.parse(xml_list)
        root = tree.getroot()
        for object in root.findall ("object"):
            name = object.find("name")
            if name.text == "seastar":
                root.remove(object)
            if name.text == "echinus":
                name.text = "seaurchin"
            if name.text == "trepang":
                name.text = "seacucumber"
            if name.text == "shell":
                name.text = "scallop"
        tree.write(xml_list)
